class CPU{
    int speed;

    public void setSpeed(int m){
        this.speed = m;
    }
}

class HardDisk{
    int amount;
    public void setAmount(int m){
        this.amount = m;
    }

    public int getAmount(){
        return amount;
    }
}

class PC{
    CPU cpu;
    HardDisk HD;
    
    public void setCPU(CPU c){
        this.cpu=c;
    }

    public void setHardDisk(HardDisk h){
        this.HD = h;
    }

    public void show(){
        System.out.println("CPU的运行速度为:" + cpu.speed + " Hz"+ "硬盘的容量为:" + HD.amount + "GB");
    }
}
public class Test {
    public static void main(String[] args){
        CPU cpu = new CPU();
        cpu.setSpeed(2200);
    
        HardDisk disk = new HardDisk();
            disk.setAmount(200);
    
            PC pc = new PC();
            pc.setCPU(cpu);
            pc.setHardDisk(disk);
            pc.show();
        }
}